package com.firebird.app.kotlin.stock.utils

import com.google.gson.Gson
import okhttp3.MediaType
import okhttp3.RequestBody
import java.util.*


object MaptoJsonUtils {
    fun Simple(keylist: List<String>, valulist: List<String>): RequestBody {
        val map: MutableMap<String, String> = HashMap()
        for (i in keylist.indices) {
            map[keylist[i]] = valulist[i]
        }
        val gson = Gson()
        val jsonStr = gson.toJson(map)
        return RequestBody.create(MediaType.parse("application/json"), jsonStr)
    }
}